<?php
/**
 * Description
 *
 * PHP version 7
 *
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-22 23:06:30
 * @lastTime 2020-05-01 22:53:42
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */

namespace Design\Creational\AbstractFactory;

class UnixJsonWriter implements JsonWriter
{


    public function write(array $data, bool $formatted=false): string
    {
        $options = $formatted === true ? JSON_PRETTY_PRINT : 0;
        return json_encode($data, $options);

    }//end write()


}//end class
